/*
 *  @ProductName@
 *  Copyright (C) @CopyrightYear@
 *    National Institute of Advanced Industrial Science and Technology (AIST)
 *    Registration Number: @AISTRegistrationNumber@
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package jp.go.aist.six.vuln.model.scap.cpe.dictionary;

import jp.go.aist.six.util.orm.AbstractPersistable;
import jp.go.aist.six.util.orm.Dependent;




/**
 * The Text allows the language attribute to associate
 * a specific language with a string content.
 *
 * @author	Akihito Nakamura, AIST
 * @version $Id: CpeTitle.java 81 2010-05-19 00:28:13Z nakamura5akihito $
 */
public class CpeTitle
    extends AbstractPersistable
    implements Dependent<CpeItem>
{

    /**
     */
    private String  _text;


    /**
     */
    private String  _lang;



    /**
     * Constructor.
     */
    public CpeTitle()
    {
    }



    /**
     * Constructor.
     */
    public CpeTitle(
                    final String text
                    )
    {
        setText( text );
    }



    /**
     */
    public void setText(
                    final String text
                    )
    {
        _text = text;
    }


    /**
     */
    public String getText()
    {
        return _text;
    }



    /**
     */
    public void setLang(
                    final String lang
                    )
    {
        _lang = lang;
    }


    /**
     */
    public String getLang()
    {
        return _lang;
    }



    //**************************************************************
    //  Dependent
    //**************************************************************

    private CpeItem  _master;

    public CpeItem getMasterObject()
    {
        return _master;
    }


    public void setMasterObject(
                    final CpeItem item
                    )
    {
        _master = item;
    }



    //**************************************************************
    //  java.lang.Object
    //**************************************************************

    /**
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString()
    {
        return "CpeTitle[" + getText()
                + ", lang=" + getLang()
                + "]";
    }

}
// CpeTitle
